load("@rules_rust//rust:defs.bzl", "rust_library")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/nervous_system/proto",
    "//rs/node_rewards/rewards_calculation",
    "//rs/protobuf",
    "//rs/types/base_types",
    "@crate_index//:candid",
    "@crate_index//:chrono_canisters",
    "@crate_index//:ic-cdk",
    "@crate_index//:rust_decimal",
    "@crate_index//:serde",
]

MACRO_DEPENDENCIES = [
    # Keep sorted.
]

LIB_SRCS = glob(
    [
        "src/**/*.rs",
    ],
    exclude = ["**/*tests*/**"],
)

rust_library(
    name = "api",
    srcs = LIB_SRCS,
    crate_name = "ic_node_rewards_canister_api",
    proc_macro_deps = MACRO_DEPENDENCIES,
    version = "0.9.0",
    deps = DEPENDENCIES,
)
